<!DOCTYPE html>
<html lang="zh"
      xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <link rel="stylesheet" href="../../build/css/ztree/metro/ztree.css">
    <link rel="stylesheet" href="../../plugins/layui/css/layui.css" media="all">
    <link rel="stylesheet" href="../../plugins/font-awesome/css/font-awesome.min.css" media="all">
    <script src="../../static/businessJs/department.js"></script>
<body>
<div class="layui-row">
    <div class="layui-col-md2">
        <div>
            <ul id="ztree" class="ztree"></ul>
        </div>
    </div>
    <div class="layui-col-md10">
        <div class="layui-btn-group departmentToolBar" style="margin-top: 5px" shiro:hasPermission="upms:users:department:add">
            <button class="layui-btn" data-type="addDepartment">添加</button>
        </div>
        <hr class="layui-bg-red">
        <div>
            <table id="departmentTable" lay-filter="departmentTable"></table>
        </div>
    </div>
</div>
<shiro:hasPermission name="upms:users:department:delete">
    <script type="text/html" id="barMenus">
        <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">删除</a>
    </script>
</shiro:hasPermission>

<div id="addDepartmentForm" style="margin-top:30px;display: none">
    <form class="layui-form" action="" method="post">
        <div class="layui-form-item">
            <label class="layui-form-label">部门名称</label>
            <div class="layui-input-block">
                <input type="text" name="name" lay-verify="required" autocomplete="off" placeholder="请输入名称" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">部门描述</label>
            <div class="layui-input-block">
                <input type="text" name="desc" lay-verify="required" autocomplete="off" placeholder="请输入部门描述" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">排序</label>
            <div class="layui-input-block">
                <input type="text" name="order"  lay-verify="required" autocomplete="off" placeholder="请输入排序" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <div class="layui-input-block">
                <button class="layui-btn layui-btn-radius" lay-submit lay-filter="addDepartmentSubmit">立即提交</button>
                <button type="reset" class="layui-btn layui-btn-radius">重置</button>
            </div>
        </div>
    </form>
</div>

<script src="../../plugins/layui/layui.js"></script>
<script src="../../businessJs/department.js"></script>
</body>
</html>